package com.breezelin.freshmarket.network.asynctasks;

/**
 * Created by Breeze Lin
 * 2016/9/23 14:05
 * breezesummerlin@163.com
 */

import com.breezelin.freshmarket.entities.JsonStruct;
import com.breezelin.freshmarket.entities.network.ReqNRsp;
import com.breezelin.freshmarket.network.FMAsyncTask;
import com.breezelin.freshmarket.network.apis.ProfileApi;

/**
 * 发送验证码的请求
 */
public abstract class VerifyCodeTask extends FMAsyncTask<Void, Void, ReqNRsp<JsonStruct>> {

	/**
	 * 电话号码
	 */
	private String phoneNo;

	/**
	 * 请求发送验证码
	 *
	 * @param phoneNo 电话号码
	 */
	public VerifyCodeTask(String phoneNo) {
		super(ProfileApi.REQUEST_VERIFY_CODE);
		this.phoneNo = phoneNo;
	}

	@Override
	protected ReqNRsp<JsonStruct> doInBackground(Void... params) {
		return ProfileApi.requestVerifyCode(phoneNo);
	}
}
